<%@ page language="java" contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>	
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link rel="stylesheet" href="${CSS}bootstrap.min.css"/>
		<link rel="stylesheet" href="${CSS}iconfont.css"/>	
		<link rel="stylesheet" href="${CSS}widgets.css"/>
		<link rel="stylesheet" href="${CSS}b.page.bootstrap3.css"/>
		<script src="${JS}jquery-3.2.1.min.js"></script>
		<script src="${JS}bootstrap.min.js"></script>
		<script src="${JS}widgets.js"></script>
		<script type="text/javascript" src="${JS}b.page.js"></script>
	</head>
	<body>
		<div class="container-fluid">
			<div class="row">
				<div class="widget-box  widget-color-blue" id="3061">
					<div class="widget-header widget-header-small">
						<h6 class="widget-title">
							<i class="iconfont icon-009 size-16">
							</i>
							用户管理
						</h6>
					</div>
					<div class="widget-body">
						<div class="widget-body-inner" style="display: block;">
							<div class="widget-main"  style="padding: 12px;">
								<table class="bTable table table-striped table-bordered table-hover table-condensed">
								<thead>
									<tr>
										<th width="70px">用户ID</th>
										<th>用户名</th>
										<th>角色</th>
										<th>部门</th>
										<th>管理操作</th>
										<th>状态</th>
									</tr>
								</thead>
								<tbody>
								<c:forEach items="${list}" var="val">
									<tr>
									    <td>${val.aid}</td>
										<td>${val.aname}</td>
										<td>${val.rname}</td>							
										<td>${val.dname}</td>	
										<td>
										<c:if test="${val.status==1}">
										<span class="label-success label">正常</span>
	    					 			</c:if>  
	    					 			<c:if test="${val.status==0}">
	    					 			<span class="label-default label">禁用</span>
	    					 			</c:if>  
	    					 			</td>							
										<td>
										<a href="add_update_view?aid=${val.aid}" class="btn btn-primary btn-xs"><i class="iconfont icon-edit bigger-120"></i> 修改</a>&nbsp;&nbsp;
	    					   			<c:if test="${val.rid ne '4' && val.rid ne '5' }">
		    					   			<c:if test="${val.status==1}">
		    					   			<a href="delete_user?aid=${val.aid}" class="btn btn-primary btn-xs"><i class="iconfont icon-jinyong bigger-120"></i> 禁用</a>	
		    					 			</c:if>  
		    					 			<c:if test="${val.status==0}">
		    					   			<a href="qiyong_user?aid=${val.aid}" class="btn btn-primary btn-xs"><i class="iconfont icon-kaisuo bigger-120"></i> 启用</a>	
		    					 			</c:if> 
	    					 			</c:if> 			
										</td>
									</tr>
								 </c:forEach>							
								</tbody>
							</table>
						</div>
						</div>
					</div>
					<div id="page" pagenumber="1" pagesize="10" totalrow="100"></div>	
				</div>
			</div>
		</div>
		<script>					
		$(function(){
			widget.init();
			//当前页	
			var pageNumber=$('#page').attr("pageNumber");
			//每页多少行	
			var pageSize=$('#page').attr("pageSize");
			//总共多少行
			var totalRow=$('#page').attr("totalRow");
			//总共多少页
			var totalPage=Math.ceil(totalRow/pageSize);
			$('#page').bPage({  
			    url : '',
			    totalPage :totalPage,
			    totalRow :totalRow,
			    pageSize :pageSize,
			    pageNumber:pageNumber
			});	
		});
		</script>
	</body>

</html>